package com.smile.frame.alibaba.services.order.controller;


import com.smile.frame.alibaba.common.constants.DubboConstant;
import com.smile.frame.alibaba.interfaces.user.dto.UserDTO;
import com.smile.frame.alibaba.interfaces.user.service.IUserService;
import com.smile.frame.common.result.Result;
import com.smile.frame.config.log.systemlog.SystemLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LGC
 * @date 2021/8/27 9:52
 */
@Slf4j
@Api(tags = "OrderController")
@RestController
public class OrderController {

    @DubboReference(version = DubboConstant.VERSION_1)
    private IUserService iUserService;


    @SystemLog
    @PostMapping("/api/order/getOrderInfo")
    @ApiOperation(value = "getOrderInfo")
    public Result<UserDTO> getOrderInfo(Long user_id) {
        UserDTO userInfo = iUserService.getUserInfo(user_id);
        return Result.ok(userInfo);
    }


}
